.overlay {
        background:#000;
        position:absolute;
        top:0px;
        left:0px;
        display:none;
        overflow: hidden;
}
    
.dark-overlay{
    position:fixed; /* ze trick*/ 
    background:#000;
    opacity:.5;
    top:0;
    bottom: 0;
    left:0;
    right: 0;
    overflow: hidden;
    z-index: 90000;/* everything you want on top, gets higher z-index*/
}